* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
  line-height: 1.6;
}

.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 20px 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo {
  font-size: 40px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 12px;
}

.brand-title {
  font-size: 20px;
  font-weight: bold;
  color: #2c3e50;
}

.brand-sub {
  font-size: 12px;
  color: #7f8c8d;
}

.nav {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  color: #555;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.3s;
}

.nav a:hover {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.card h2 {
  font-size: 24px;
  color: #2c3e50;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card h2::before {
  content: "●";
  color: #667eea;
  font-size: 20px;
}

.muted {
  color: #7f8c8d;
  font-size: 14px;
  margin-bottom: 20px;
}

.grid {
  display: grid;
  gap: 15px;
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.input {
  padding: 12px 16px;
  border: 2px solid #e1e8ed;
  border-radius: 10px;
  font-size: 15px;
  transition: all 0.3s;
}

.input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  background: #e1e8ed;
  color: #555;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn.primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.btn.primary:hover {
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.output {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 10px;
  font-size: 14px;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 400px;
  overflow-y: auto;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.list-item {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  border-left: 4px solid #667eea;
  transition: all 0.3s;
}

.list-item:hover {
  background: #e9ecef;
  transform: translateX(5px);
}

.list-item h3 {
  font-size: 18px;
  color: #2c3e50;
  margin-bottom: 10px;
}

.list-item p {
  color: #555;
  font-size: 14px;
  margin-bottom: 5px;
}

.chat {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 20px;
  min-height: 300px;
  max-height: 500px;
  overflow-y: auto;
  margin-bottom: 20px;
}

.chat-message {
  margin-bottom: 20px;
  padding: 15px;
  border-radius: 12px;
  max-width: 80%;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-message.user {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  margin-left: auto;
  text-align: right;
}

.chat-message.assistant {
  background: #ffffff;
  color: #333;
  margin-right: auto;
  border: 1px solid #e1e8ed;
}

.chat-input {
  display: flex;
  gap: 10px;
}

.chat-input .input {
  flex: 1;
}

.footer {
  text-align: center;
  padding: 30px;
  color: white;
  opacity: 0.9;
  font-size: 14px;
}

@media (max-width: 768px) {
  .header {
    padding: 15px 20px;
  }

  .brand-title {
    font-size: 16px;
  }

  .nav {
    gap: 8px;
  }

  .nav a {
    padding: 6px 12px;
    font-size: 14px;
  }

  .container {
    padding: 20px 10px;
  }

  .card {
    padding: 20px;
  }

  .grid-4 {
    grid-template-columns: 1fr;
  }

  .chat-message {
    max-width: 90%;
  }
}